/*
 * This file is generated by jOOQ.
 */

package ru.tinkoff.edu.java.scrapper.domain.jooq.tables.records;

import java.beans.ConstructorProperties;
import java.time.OffsetDateTime;
import javax.annotation.processing.Generated;
import org.jetbrains.annotations.NotNull;
import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Record2;
import org.jooq.Row2;
import org.jooq.impl.UpdatableRecordImpl;
import ru.tinkoff.edu.java.scrapper.domain.jooq.tables.TelegramChat;

/**
 * This class is generated by jOOQ.
 */
@Generated(
    value = {
        "https://www.jooq.org",
        "jOOQ version:3.18.9"
    },
    comments = "This class is generated by jOOQ"
)
@SuppressWarnings({"all", "unchecked", "rawtypes", "this-escape"})
public class TelegramChatRecord extends UpdatableRecordImpl<TelegramChatRecord>
    implements Record2<Long, OffsetDateTime> {

    private static final long serialVersionUID = 1L;

    /**
     * Setter for <code>TELEGRAM_CHAT.ID</code>.
     */
    public void setId(@NotNull Long value) {
        set(0, value);
    }

    /**
     * Getter for <code>TELEGRAM_CHAT.ID</code>.
     */
    @jakarta.validation.constraints.NotNull
    @NotNull
    public Long getId() {
        return (Long) get(0);
    }

    /**
     * Setter for <code>TELEGRAM_CHAT.REGISTERED_AT</code>.
     */
    public void setRegisteredAt(@NotNull OffsetDateTime value) {
        set(1, value);
    }

    /**
     * Getter for <code>TELEGRAM_CHAT.REGISTERED_AT</code>.
     */
    @jakarta.validation.constraints.NotNull
    @NotNull
    public OffsetDateTime getRegisteredAt() {
        return (OffsetDateTime) get(1);
    }

    // -------------------------------------------------------------------------
    // Primary key information
    // -------------------------------------------------------------------------

    @Override
    @NotNull
    public Record1<Long> key() {
        return (Record1) super.key();
    }

    // -------------------------------------------------------------------------
    // Record2 type implementation
    // -------------------------------------------------------------------------

    @Override
    @NotNull
    public Row2<Long, OffsetDateTime> fieldsRow() {
        return (Row2) super.fieldsRow();
    }

    @Override
    @NotNull
    public Row2<Long, OffsetDateTime> valuesRow() {
        return (Row2) super.valuesRow();
    }

    @Override
    @NotNull
    public Field<Long> field1() {
        return TelegramChat.TELEGRAM_CHAT.ID;
    }

    @Override
    @NotNull
    public Field<OffsetDateTime> field2() {
        return TelegramChat.TELEGRAM_CHAT.REGISTERED_AT;
    }

    @Override
    @NotNull
    public Long component1() {
        return getId();
    }

    @Override
    @NotNull
    public OffsetDateTime component2() {
        return getRegisteredAt();
    }

    @Override
    @NotNull
    public Long value1() {
        return getId();
    }

    @Override
    @NotNull
    public OffsetDateTime value2() {
        return getRegisteredAt();
    }

    @Override
    @NotNull
    public TelegramChatRecord value1(@NotNull Long value) {
        setId(value);
        return this;
    }

    @Override
    @NotNull
    public TelegramChatRecord value2(@NotNull OffsetDateTime value) {
        setRegisteredAt(value);
        return this;
    }

    @Override
    @NotNull
    public TelegramChatRecord values(@NotNull Long value1, @NotNull OffsetDateTime value2) {
        value1(value1);
        value2(value2);
        return this;
    }

    // -------------------------------------------------------------------------
    // Constructors
    // -------------------------------------------------------------------------

    /**
     * Create a detached TelegramChatRecord
     */
    public TelegramChatRecord() {
        super(TelegramChat.TELEGRAM_CHAT);
    }

    /**
     * Create a detached, initialised TelegramChatRecord
     */
    @ConstructorProperties({"id", "registeredAt"})
    public TelegramChatRecord(@NotNull Long id, @NotNull OffsetDateTime registeredAt) {
        super(TelegramChat.TELEGRAM_CHAT);

        setId(id);
        setRegisteredAt(registeredAt);
        resetChangedOnNotNull();
    }

    /**
     * Create a detached, initialised TelegramChatRecord
     */
    public TelegramChatRecord(ru.tinkoff.edu.java.scrapper.domain.jooq.tables.pojos.TelegramChat value) {
        super(TelegramChat.TELEGRAM_CHAT);

        if (value != null) {
            setId(value.getId());
            setRegisteredAt(value.getRegisteredAt());
            resetChangedOnNotNull();
        }
    }
}
